<!DOCTYPE html>
<html lang="zh-cn">

<head>
  <!-- Required meta tags -->
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <!-- Bootstrap CSS -->
  <link rel="stylesheet" href="bootstrap-4.4.1-dist/css/bootstrap.min.css">
  <link rel="shortcut icon" href="search.png">
  <title>聚合搜索</title>
  <style>
    a:link {
      text-decoration: none;
      color: white;
    }

    /* 未被访问的链接 */
    a:visited {
      text-decoration: none;
      color: white;
    }

    /* 已被访问的链接 */
    a:hover {
      text-decoration: none;
      color: white;
    }

    /* 鼠标指针移动到链接上 */
    a:active {
      text-decoration: none;
      color: white;
    }

    /* 正在被点击的链接 */
    .bg {
      background: url("");
      background-size: cover;
      background-position: center;
      background-repeat: no-repeat;
      background-origin: content-box;
      background-clip: content-box;
    }

    html,
    body {
      height: 100%;
    }

    .download_pic {
      position: fixed;
      bottom: 10px;
      right: 10px;
      font-size: smaller;
      cursor: default;
    }
  </style>
</head>


<body class="bg" id="body">
  <div class="container-fluid pt-2">
    <div class="row align-items-center">
      <div class="col-lg-3 col-0 justify-content-center d-flex"></div>
      <div class="col-lg-6 col-12 justify-content-center d-flex">
        <input id="myinput" class="form-control form-control-sm m-1" type="text" placeholder="">
      </div>
      <div class="col-lg-3 col-0 justify-content-center d-flex"></div>
    </div>
    <div class="row align-items-center">
      <div class="col-lg-2 col-0 justify-content-center d-flex"></div>
      <div class="col-lg-8 col-12 justify-content-center d-flex flex-wrap">
        <button id="google_button" type="button" class="btn btn-secondary btn-sm  m-1" style="cursor: default;">
          <a id="google_a" href="https://www.google.com.hk/">谷歌</a>
        </button>
        <button id="DuckDuckGo_button" type="button" class="btn btn-secondary btn-sm  m-1" style="cursor: default;">
          <a id="DuckDuckGo_a" href="https://duckduckgo.com/">DuckDuckGo</a>
        </button>
        <button id="zhihu_button" type="button" class="btn btn-secondary btn-sm  m-1" style="cursor: default;">
          <a id="zhihu_a" href="https://www.zhihu.com/">知乎</a>
        </button>
        <button id="bing_button" type="button" class="btn btn-secondary btn-sm  m-1" style="cursor: default;">
          <a id="bing_a" href="https://cn.bing.com/">必应</a>
        </button>
        <button id="sougouweixin_button" type="button" class="btn btn-secondary btn-sm  m-1" style="cursor: default;">
          <a id="sougouweixin_a" href="https://weixin.sogou.com/">搜狗|微信</a>
        </button>
        <button id="toutiaosousuo_button" type="button" class="btn btn-secondary btn-sm  m-1" style="cursor: default;">
          <a id="toutiaosousuo_a" href="https://so.toutiao.com/">头条搜索</a>
        </button>
        <button id="douban_button" type="button" class="btn btn-secondary btn-sm  m-1" style="cursor: default;">
          <a id="douban_a" href="https://www.douban.com/">豆瓣</a>
        </button>
        <button id="bilibili_button" type="button" class="btn btn-secondary btn-sm  m-1" style="cursor: default;">
          <a id="bilibili_a" href="https://www.bilibili.com/">哔哩哔哩</a>
        </button>
        <button id="guosou_button" type="button" class="btn btn-secondary btn-sm  m-1" style="cursor: default;">
          <a id="guosou_a" href="http://www.chinaso.com/">国搜</a>
        </button>
        <button id="douyin_button" type="button" class="btn btn-secondary btn-sm  m-1" style="cursor: default;">
          <a id="douyin_a" href="https://www.douyin.com/">抖音</a>
        </button>
        <button id="redbook_button" type="button" class="btn btn-secondary btn-sm  m-1" style="cursor: default;">
          <a id="redbook_a" href="https://www.xiaohongshu.com/">小红书</a>
        </button>
        <button id="youdao_button" type="button" class="btn btn-secondary btn-sm  m-1" style="cursor: default;">
          <a id="youdao_a" href="https://www.youdao.com/">有道</a>
        </button>
        <button id="baidu_button" type="button" class="btn btn-secondary btn-sm  m-1" style="cursor: default;">
          <a id="baidu_a" href="https://www.baidu.com/">百度</a>
        </button>
      </div>
    </div>
  </div>
  <div class="download_pic">
    <a href="https://api.dujin.org/bing/1920.php" download="bing_wallpaper.jpg" target="_blank">
      <svg t="1588648704678" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
        p-id="3826" width="20" height="20">
        <path
          d="M46.535111 580.949333c12.344889 0 24.177778 4.892444 32.910222 13.568 8.732444 8.647111 13.653333 20.423111 13.653334 32.711111v201.159112c0 25.543111 20.821333 46.250667 46.535111 46.250666h744.732444c25.713778 0 46.535111-20.707556 46.535111-46.250666V627.2c0-16.497778 8.874667-31.772444 23.267556-40.049778 14.421333-8.248889 32.142222-8.248889 46.563555 0 14.392889 8.248889 23.267556 23.523556 23.267556 40.049778v201.187556C1024 905.016889 961.479111 967.111111 884.337778 967.111111H139.662222C62.492444 967.111111 0 905.016889 0 828.387556V627.2c0-25.543111 20.849778-46.250667 46.535111-46.250667z"
          fill="#000000" p-id="3827"></path>
        <path
          d="M327.111111 102.855111A46.08 46.08 0 0 1 373.276444 56.888889h277.333334A46.08 46.08 0 0 1 696.888889 102.855111v266.325333h138.666667c19.2 0 36.408889 11.776 43.235555 29.639112a45.795556 45.795556 0 0 1-12.515555 50.716444L542.634667 734.862222a46.421333 46.421333 0 0 1-61.326223 0L157.781333 449.536a45.795556 45.795556 0 0 1-12.544-50.688 46.222222 46.222222 0 0 1 43.178667-29.667556h138.666667V102.855111z m92.444445 45.966222v266.325334a46.08 46.08 0 0 1-46.250667 45.966222h-63.089778l201.756445 177.92 201.756444-177.92h-63.089778a46.08 46.08 0 0 1-46.222222-45.966222V148.821333h-184.888889z"
          fill="#000000" p-id="3828">
        </path>
      </svg>
    </a>
  </div>
  <!-- <div id="copy_right" class="copyRight zindex-tooltip text-light">
    <a id="copy_right_a" href="" style="cursor:default;"></a>
  </div> -->
  <!-- Optional JavaScript -->
  <!-- jQuery first, then Popper.js, then Bootstrap JS -->
  <script src="js/jquery.min.js"></script>
  <!-- <script src="popper.js@1.16.0/dist/umd/popper.min.js"></script> -->
  <script src="bootstrap-4.4.1-dist/js/bootstrap.min.js"></script>
  <script>
    //光标定位到输入框
    $('#myinput').focus();
    //判断终端类型
    var isMobile = false;
    if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
      isMobile = true;
    }
    $(document).ready(function () {
      // 国搜
      $("#guosou_button").mouseenter(function () {
        if ($("#myinput").val() != '') {
          if (isMobile) {
            $("#guosou_a").attr("href", "http://m.chinaso.com/page/search.htm?keys=" + $("#myinput").val());
          } else {
            $("#guosou_a").attr("href", "http://www.chinaso.com/search/pagesearch.htm?q=" + $("#myinput").val());
          }
        }
      });
      // 百度
      $("#baidu_button").mouseenter(function () {
        if ($("#myinput").val() != '') {
          $("#baidu_a").attr("href", "https://www.baidu.com/s?wd=" + $("#myinput").val());
        }
      });
      // 有道
      $("#youdao_button").mouseenter(function () {
        if ($("#myinput").val() != '') {
          $("#youdao_a").attr("href", "https://www.youdao.com/result?lang=en&word=" + $("#myinput").val());
        }
      });
      
      // 谷歌
      $("#google_button").mouseenter(function () {
        if ($("#myinput").val() != '') {
          $("#google_a").attr("href", "https://www.google.com.hk/search?q=" + $("#myinput").val());
        }
      });
      // DuckDuckGo
      $("#DuckDuckGo_button").mouseenter(function () {
        if ($("#myinput").val() != '') {
          $("#DuckDuckGo_a").attr("href", "https://www.duckduckgo.com/?q=" + $("#myinput").val());
        }
      });
      // 必应
      $("#bing_button").mouseenter(function () {
        if ($("#myinput").val() != '') {
          $("#bing_a").attr("href", "https://cn.bing.com/search?q=" + $("#myinput").val());
        }
      });
      // 知乎
      $("#zhihu_button").mouseenter(function () {
        if ($("#myinput").val() != '') {
          $("#zhihu_a").attr("href", "https://www.zhihu.com/search?q=" + $("#myinput").val());
        }
      });
      // 搜狗|微信
      $("#sougouweixin_button").mouseenter(function () {
        if ($("#myinput").val() != '') {
          if (isMobile) {
            $("#sougouweixin_a").attr("href", "https://weixin.sogou.com/weixinwap?type=2&query=" + $("#myinput").val());
          } else {
            $("#sougouweixin_a").attr("href", "https://weixin.sogou.com/weixin?type=2&query=" + $("#myinput").val());
          }
        }
      });
      // 抖音
      $("#douyin_button").mouseenter(function () {
        if ($("#myinput").val() != '') {
          $("#douyin_a").attr("href", "https://www.douyin.com/search/" + $("#myinput").val());
        }
      });
      // 小红书
      $("#redbook_button").mouseenter(function () {
        if ($("#myinput").val() != '') {
          $("#redbook_a").attr("href", "https://www.xiaohongshu.com/search_result?keyword=" + $("#myinput").val());
        }
      });
      // 头条
      $("#toutiaosousuo_button").mouseenter(function () {
        if ($("#myinput").val() != '') {
          $("#toutiaosousuo_a").attr("href", "https://so.toutiao.com/search/?dvpf=pc&dvpf=pc&keyword=" + $("#myinput").val());
        }
      });
      // 微博
      $("#weibo_button").mouseenter(function () {
        if ($("#myinput").val() != '') {
          $("#weibo_a").attr("href", "https://s.weibo.com/weibo/" + $("#myinput").val());
        }
      });
      // 豆瓣
      $("#douban_button").mouseenter(function () {
        if ($("#myinput").val() != '') {
          $("#douban_a").attr("href", "https://www.douban.com/search?q=" + $("#myinput").val());
        }
      });
      // 哔哩哔哩
      $("#bilibili_button").mouseenter(function () {
        if ($("#myinput").val() != '') {
          if (isMobile) {
            $("#bilibili_a").attr("href", "https://m.bilibili.com/search?keyword=" + $("#myinput").val());
          } else {
            $("#bilibili_a").attr("href", "https://search.bilibili.com/all?keyword=" + $("#myinput").val());
          }
        }
      });
      // 回车键
      $("#myinput").keydown(function (e) {
        if (e.which == 13) {
          $("#google_button").trigger("mouseenter");
          // $("#doge_a")[0].trigger("click");
          document.getElementById("google_a").click();
        }
      });
      // 显示背景图片
      $("body").css("background", "url('https://api.dujin.org/bing/1920.php')");
      $("body").css("background-size", "cover");
      $("body").css("background-position", "center");
      $("body").css("background-repeat", "no-repeat");
      $("body").css("background-origin", "content-box");
      $("body").css("background-clip", "content-box");
      // $("#test").text(navigator.userAgent);
    });

  </script>
</body>

</html>
